package com.xbxkj.api.app.mini.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xbxkj.api.app.mini.entity.MiniAppConst;
import com.xbxkj.commen.bean.Dictionaries;
import com.xbxkj.commen.controller.BaseController;
import com.xbxkj.commen.controller.helper.$;
import com.xbxkj.commen.controller.model.ResultModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 字典表 前端控制器
 * </p>
 *
 * @author 张子艺
 * @since 2019-08-19
 */
@Controller( )
@RequestMapping("/app/mini/{appid}/dictionaries")
@Api( tags="常量接口")
public class DictionariesController extends MiniAppBaseController {
    /** 查询UserAddress
     * @return 返回统一信息
     */
    @GetMapping(value = "/findDicByName")
    @ApiOperation(value = "查询常量", notes = "查询常量，查询一个value下的子集")
    @ResponseBody
    @ApiImplicitParam(name = "token", value = "令牌" , paramType = "header", required = true)
    public ResultModel<?> UserAddressList(HttpServletRequest request, @RequestParam @ApiParam(name = "value", value = "需要查询的常量value", required = true) String value ){
        return $.success( dictionariesService.findDicByParentValue(value));
    }


}
